package when3meet.view;

import client.ServerAccess;

/**
 * Simply add XML layer
 * 
 * @author Xi
 * 
 */
public class Application {

	SignInFrame signInFrame;
	CreateEventFrame createEventFrame;
	MainFrame mainFrame;
	ServerAccess access;
	public static Application app;

	private Application() {
		signInFrame = SignInFrame.getInstance();
	}

	/** Return the server access object. */
	public ServerAccess getServerAccess() {

		return access;
	}

	/** Application needs to know the access object for contacting server. */
	public void setServerAccess(ServerAccess sa) {
		this.access = sa;
	}

	public static Application getInstance() {
		if (app == null) {
			app = new Application();
			return app;
		} else {
			return app;
		}
	}

	public static void dispose() {
		app = null;
	}

}
